import { StrictMode, Suspense } from 'react'
import { createRoot } from 'react-dom/client'
import './index.css'
import App from './App.tsx'

import { Provider } from 'react-redux'
import { PersistGate } from 'redux-persist/integration/react'
import { BrowserRouter } from 'react-router-dom'
import { ConfigProvider } from 'antd'
import AutnToken from './components/authToken/index.tsx'

import zhCN from 'antd/es/locale/zh_CN';  //引入中文包 
import { storeData, persistor } from "@/store"
import dayjs from 'dayjs'
// createRoot(document.getElementById('root')!).render(
//   <StrictMode>
//     <App />
//   </StrictMode>,
// )
dayjs.locale('cn');
createRoot(document.getElementById('root')!).render(
  <Suspense fallback={<div>稍等</div>}>
    <Provider store={storeData}>

      <PersistGate loading={null} persistor={persistor}>
        <BrowserRouter basename="/admin">
        
          <ConfigProvider locale={zhCN}>
              <AutnToken>
              <StrictMode>
    <App />
  </StrictMode>
               
              </AutnToken>
            
          </ConfigProvider>
       
          
        </BrowserRouter>
      </PersistGate>

    </Provider>
  </Suspense>
  
)
